Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stochastic Theta method #498

Closed
wants to merge 3 commits into from

Conversation

lockwo
Copy link
Contributor

@lockwo lockwo commented Aug 23, 2024

@lockwo lockwo marked this pull request as ready for review August 23, 2024 06:00
@patrick-kidger
Copy link
Owner

I don't think I'm completely comfortable with this solver!

The main point is adaptivity -- famously, adaptive Euler fails to converge to the Ito solution. I think this is opening a similar footgun.

Naming-wise I think this is also easy to muddle up with the other θ-method, that converges to an arbitrary point between or beyond the Ito and Stratonovich solutions.

On balance I think this has too many footguns for inclusion in Diffrax itself. But thank you anyway!

@frankschae
Copy link

frankschae commented Aug 26, 2024

Naming-wise I think this is also easy to muddle up with the other θ-method, that converges to an arbitrary point between or beyond the Ito and Stratonovich solutions.

One easy way to deal with this would be to implement only the two most common cases (trapezoidal rule for θ=0.5 and drift-implicit Euler rule for θ=1) instead of allowing every θ in [0, 1]. I think both of these solvers would be good additions due to the implicit treatment of the drift, see https://epubs.siam.org/doi/abs/10.1137/S003614299834736X for a stability analysis.

The main point is adaptivity -- famously, adaptive Euler fails to converge to the Ito solution. I think this is opening a similar footgun.

Good point. Is there a good way to make this non-adaptive while allowing a user to define an error estimate and controller if they want to? In particular, we actually want to support/implement the following weak adaptive scheme for SDEs with small noise:

https://epubs.siam.org/doi/abs/10.1137/030601429

which is based on the stochastic θ method. Could we just hardcode the error estimate/controller to follow this scheme and write explicitly that this is meant for weak solutions of SDEs with small noise?

@lockwo
Copy link
Contributor Author

lockwo commented Aug 26, 2024

One easy way to deal with this would be to implement only the two most common cases (trapezoidal rule for θ=0.5 and drift-implicit Euler rule for θ=1)

Very true, we can reduce the subspace of theta if we need to. Drift implicit is low hanging fruit (given there is already implicit).

Good point. Is there a good way to make this non-adaptive while allowing a user to define an error estimate and controller if they want to? In particular, we actually want to support/implement the following weak adaptive scheme for SDEs with small noise:

This was with the end goal, so we can also split this into Drift implicit with no error estimate (and 0.5 theta), and the RW scheme which has a novel error estimate in a separate PR

@patrick-kidger
Copy link
Owner

I think for now I'm going to say this is out-of-scope for Diffrax, I'm afraid. I think the details here are subtle enough that I don't think I can commit to supporting them going forward. :)

@lockwo lockwo closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants